<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Attribute extends Model
{
    protected $table = 'attribute'; 

    protected $fillable = ['cat_id', 'name', 'input_type', 'select_type', 'status'];

    public $timestamps = false;

    public function category()
    {
    	return $this->belongsTo(Category::class, 'cat_id', 'id');
    }

    public function val(){
    	return $this->hasMany(AttributeValue::class,'attr_id','id');
    }
}
